package com.dyh.quickdemozwei.fd;

import com.alibaba.fastjson.JSONObject;
import com.dyh.quickdemozwei.mdh.SmartArgUtils;

public interface FunctionD {
    Object apply(Object...args);


    FunctionD functionD = ag->{
        int ag0 = SmartArgUtils.softArgGet(0,ag);
        JSONObject ag1 = SmartArgUtils.softArgGet(1,ag);

        ag1.put("dawd",ag0);

        return ag0+1;
    };

    FunctionD functionD1 = ag->{
        int ag0 = SmartArgUtils.softArgGet(0,ag);
        String ag1 = SmartArgUtils.softArgGet(1,ag);

        return ag1+ag0;
    };

    public static void main(String[] args) {
//        Object[] ctx = new Object[3];
//        ctx[0]= 1;
//        ctx[1] = "xxx";
//        ctx[2] = new JSONObject();


        int i = 1;
        String s = "xaxw";
        JSONObject jo = new JSONObject();



        Object r1 = functionD.apply(i,jo);
        Object r2 = functionD1.apply(i,s);
        System.out.println();
    }
}
